400
How can I change the password character

Dim oGrid as P
Dim var_Editor as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
var_Editor = oGrid.Columns.Add("Edit").Editor
	var_Editor.EditType = 1
	' var_Editor.Option(18) = .t.
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.Option(18) = True"

	' var_Editor.Option(19) = 45
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.Option(19) = 45"

var_Items = oGrid.Items
	var_Items.AddItem(0)
	var_Items.AddItem(1)
	var_Items.AddItem(2)

399
How can I add a password field

Dim oGrid as P
Dim var_Editor as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
var_Editor = oGrid.Columns.Add("Edit").Editor
	var_Editor.EditType = 1
	' var_Editor.Option(18) = .t.
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.Option(18) = True"

var_Items = oGrid.Items
	var_Items.AddItem(0)
	var_Items.AddItem(1)
	var_Items.AddItem(2)

398
How can I align the text to the right, in my edit control

Dim oGrid as P
Dim var_Editor as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
var_Editor = oGrid.Columns.Add("Edit").Editor
	var_Editor.EditType = 1
	' var_Editor.Option(10) = .t.
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.Option(10) = True"

var_Items = oGrid.Items
	var_Items.AddItem(0)
	var_Items.AddItem(1)
	var_Items.AddItem(2)

397
How can I add a simple edit or text box to my column

Dim oGrid as P
Dim var_Editor as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
' oGrid.Columns.Add("Edit").Editor.EditType = 1
var_Editor = oGrid.Columns.Add("Edit").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 1"

var_Items = oGrid.Items
	var_Items.AddItem(0)
	var_Items.AddItem(1)
	var_Items.AddItem(2)

396
How can I change the type of the editor

Dim oGrid as P
Dim var_Editor as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
' oGrid.Columns.Add("Edit").Editor.EditType = 1
var_Editor = oGrid.Columns.Add("Edit").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 1"

var_Items = oGrid.Items
	var_Items.AddItem(0)
	var_Items.AddItem(1)
	var_Items.AddItem(2)
oGrid.Columns.Item("Edit").Editor.EditType = 4

395
How can I add a border arround the editor

Dim oGrid as P
Dim var_Editor as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
var_Editor = oGrid.Columns.Add("Edit").Editor
	var_Editor.EditType = 1
	var_Editor.Appearance = 1
var_Items = oGrid.Items
	var_Items.AddItem("Edit")
	var_Items.AddItem("Edit")
	var_Items.AddItem("Edit")

394
How do I assign an editor for the entire column

Dim oGrid as P
Dim var_Editor as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
' oGrid.Columns.Add("Edit").Editor.EditType = 1
var_Editor = oGrid.Columns.Add("Edit").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 1"

var_Items = oGrid.Items
	var_Items.AddItem("Edit")
	var_Items.AddItem("Edit")
	var_Items.AddItem("Edit")

393
How do I check if a cell has an editor assigned

Dim oGrid as P
Dim var_Editor as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Column")
var_Items = oGrid.Items
	' var_Items.CellEditor(var_Items.AddItem("Edit -> ReadOnly "),0).EditType = 1
	var_Editor = var_Items.CellEditor(var_Items.AddItem("Edit -> ReadOnly "),0)
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.EditType = 1"

	var_Items.AddItem("ReadOnly")
	var_Items.AddItem("ReadOnly")
	var_Items.AddItem(var_Items.HasCellEditor(var_Items.FocusItem,0))

392
How do I delete or remove the editor for a sppecified cell
Dim oGrid as P
Dim var_Editor as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Column")
var_Items = oGrid.Items
	' var_Items.CellEditor(var_Items.AddItem("Edit -> ReadOnly "),0).EditType = 1
	var_Editor = var_Items.CellEditor(var_Items.AddItem("Edit -> ReadOnly "),0)
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.EditType = 1"

	var_Items.AddItem("ReadOnly")
	var_Items.AddItem("ReadOnly")
	var_Items.DeleteCellEditor(var_Items.FocusItem,0)

391
How do I hide or disable the editor assigned to a single cell

Dim oGrid as P
Dim var_Editor as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
' oGrid.Columns.Add("Column").Editor.EditType = 1
var_Editor = oGrid.Columns.Add("Column").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 1"

var_Items = oGrid.Items
	var_Items.AddItem("Edit")
	' var_Items.CellEditorVisible(var_Items.AddItem("ReadOnly"),0) = .f.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellEditorVisible(AddItem(`ReadOnly`),0) = False"

	var_Items.AddItem("Edit")

390
How do I assign or change the editor for a particular cell

Dim oGrid as P
Dim var_Editor as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Column")
var_Items = oGrid.Items
	var_Items.AddItem("ReadOnly")
	' var_Items.CellEditor(var_Items.AddItem("Edit"),0).EditType = 1
	var_Editor = var_Items.CellEditor(var_Items.AddItem("Edit"),0)
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.EditType = 1"

	var_Items.AddItem("ReadOnly")

389
How do I get the caption of the cell as it is displayed on the control

Dim h as N
Dim oGrid as P
Dim var_Editor as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Column")
var_Items = oGrid.Items
	h = var_Items.AddItem(3)
	var_Editor = var_Items.CellEditor(h,0)
		var_Editor.EditType = 6
		var_Editor.AddItem(1,"One")
		var_Editor.AddItem(2,"Two")
	var_Items.AddItem(var_Items.CellCaption(h,0))
	var_Items.AddItem(var_Items.CellValue(h,0))

388
Shift + Ctrl + Alt + Insert sequence copies the control's content to the clipboard, in template or x-script form
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.AllowCopyTemplate = .t.
oGrid.Columns.Add("Column")
var_Items = oGrid.Items
	var_Items.AddItem("Item 3")
	var_Items.AddItem("Item 1")
	var_Items.AddItem("Item 2")

387
I've seen your template feature, is there any method to generate this x-script format

Dim oGrid as P
Dim var_Items as P
Dim var_Items1 as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.ScrollBySingleLine = .t.
oGrid.Columns.Add("Column")
var_Items = oGrid.Items
	var_Items.AddItem("Item 3")
	var_Items.AddItem("Item 1")
	var_Items.AddItem("Item 2")
var_Items1 = oGrid.Items
	' var_Items1.CellSingleLine(var_Items1.AddItem(oGrid.ToTemplate()),0) = .f.
	oGrid.TemplateDef = "dim var_Items1"
	oGrid.TemplateDef = var_Items1
	oGrid.Template = "var_Items1.CellSingleLine(AddItem(Me.ToTemplate()),0) = False"


386
How do I prevent scrolling the control's data after user does the sort

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.EnsureOnSort = .f.
oGrid.Columns.Add("Column")
var_Items = oGrid.Items
	var_Items.AddItem("Item 3")
	var_Items.AddItem("Item 1")
	var_Items.AddItem("Item 2")
oGrid.PutItems(oGrid.GetItems(0))
oGrid.PutItems(oGrid.GetItems(0))
oGrid.PutItems(oGrid.GetItems(0))
oGrid.Columns.Item(0).SortOrder = 1

385
How do I ensure that the focused item is visible, after the user does the sort

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.EnsureOnSort = .t.
oGrid.Columns.Add("Column")
var_Items = oGrid.Items
	var_Items.AddItem("Item 3")
	var_Items.AddItem("Item 1")
	var_Items.AddItem("Item 2")
oGrid.Columns.Item(0).SortOrder = 1

384
How can I disable selecting multiple items by dragging
Dim oGrid as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.SelectByDrag = .f.
oGrid.SingleSel = .t.

383
Is there any function to change the default value for options of the editors

Dim oGrid as P
Dim var_Editor as local
Dim var_Editor1 as local
Dim var_Items as P
Dim var_Items1 as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Template = "DefaultEditorOption(18) = True" // oGrid.DefaultEditorOption(18) = .t.
' oGrid.Columns.Add("Pass1").Editor.EditType = 1
var_Editor = oGrid.Columns.Add("Pass1").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 1"

' oGrid.Columns.Add("Pass2").Editor.EditType = 1
var_Editor1 = oGrid.Columns.Add("Pass2").Editor
oGrid.TemplateDef = "dim var_Editor1"
oGrid.TemplateDef = var_Editor1
oGrid.Template = "var_Editor1.EditType = 1"

var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem(1),1) = 2
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(1),1) = 2"

var_Items1 = oGrid.Items
	' var_Items1.CellValue(var_Items1.AddItem(1),1) = 2
	oGrid.TemplateDef = "dim var_Items1"
	oGrid.TemplateDef = var_Items1
	oGrid.Template = "var_Items1.CellValue(AddItem(1),1) = 2"


382
How do I close the editor, or stop editing a cell
Dim oGrid as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.EditClose()

381
Is there any function to highlight or mark the cells that have a tooltip using my picture or icon

Dim oGrid as P
Dim var_Items as P
Dim var_Items1 as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGrid.MarkTooltipCells = .t.
oGrid.MarkTooltipCellsImage = 1
oGrid.Columns.Add("")
var_Items = oGrid.Items
	' var_Items.CellToolTip(var_Items.AddItem("This is a cell with a tooltip"),0) = "This is a bit of text that is shown when the cursor hovers the cell."
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellToolTip(AddItem(`This is a cell with a tooltip`),0) = `This is a bit of text that is shown when the cursor hovers the cell.`"

var_Items1 = oGrid.Items
	' var_Items1.CellToolTip(var_Items1.AddItem("This is a cell without a tooltip"),0) = ""
	oGrid.TemplateDef = "dim var_Items1"
	oGrid.TemplateDef = var_Items1
	oGrid.Template = "var_Items1.CellToolTip(AddItem(`This is a cell without a tooltip`),0) = ``"


380
Is there any function to highlight or mark the cells that have a tooltip

Dim oGrid as P
Dim var_Items as P
Dim var_Items1 as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.MarkTooltipCells = .t.
oGrid.TooltipCellsColor = 255
oGrid.Columns.Add("")
var_Items = oGrid.Items
	' var_Items.CellToolTip(var_Items.AddItem("This is a cell with a tooltip"),0) = "This is a bit of text that is shown when the cursor hovers the cell."
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellToolTip(AddItem(`This is a cell with a tooltip`),0) = `This is a bit of text that is shown when the cursor hovers the cell.`"

var_Items1 = oGrid.Items
	' var_Items1.CellToolTip(var_Items1.AddItem("This is a cell without a tooltip"),0) = ""
	oGrid.TemplateDef = "dim var_Items1"
	oGrid.TemplateDef = var_Items1
	oGrid.Template = "var_Items1.CellToolTip(AddItem(`This is a cell without a tooltip`),0) = ``"


379
Is there any function to highlight or mark the cells that have a tooltip

Dim oGrid as P
Dim var_Items as P
Dim var_Items1 as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.MarkTooltipCells = .t.
oGrid.Columns.Add("")
var_Items = oGrid.Items
	' var_Items.CellToolTip(var_Items.AddItem("This is a cell with a tooltip"),0) = "This is a bit of text that is shown when the cursor hovers the cell."
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellToolTip(AddItem(`This is a cell with a tooltip`),0) = `This is a bit of text that is shown when the cursor hovers the cell.`"

var_Items1 = oGrid.Items
	' var_Items1.CellToolTip(var_Items1.AddItem("This is a cell without a tooltip"),0) = ""
	oGrid.TemplateDef = "dim var_Items1"
	oGrid.TemplateDef = var_Items1
	oGrid.Template = "var_Items1.CellToolTip(AddItem(`This is a cell without a tooltip`),0) = ``"


378
How do I find the window's handled when an editor is running
Dim oGrid as P
Dim var_Editing as 

oGrid = topparent:CONTROL_ACTIVEX1.activex
var_Editing = oGrid.Editing

377
How can I start editing the cell
Dim oGrid as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.AutoEdit = .f.
oGrid.Edit()

376
Is there any option to edit the control's data manually, so the editor doesn't show up as soon as the cell is focused
' Occurs when the user presses and then releases the left mouse button over the grid control.
function Click as v ()
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Edit()
end function

Dim oGrid as P
Dim var_Editor as local
Dim var_Editor1 as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.AutoEdit = .f.
oGrid.MarkSearchColumn = .f.
' oGrid.Columns.Add("Edit1").Editor.EditType = 1
var_Editor = oGrid.Columns.Add("Edit1").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 1"

' oGrid.Columns.Add("Edit2").Editor.EditType = 1
var_Editor1 = oGrid.Columns.Add("Edit2").Editor
oGrid.TemplateDef = "dim var_Editor1"
oGrid.TemplateDef = var_Editor1
oGrid.Template = "var_Editor1.EditType = 1"

var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem(1),1) = 2
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(1),1) = 2"

	' var_Items.CellValue(var_Items.AddItem(3),1) = 4
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(3),1) = 4"

oGrid.EndUpdate()

375
How can change the background color for selected editor

Dim oGrid as P
Dim var_Editor as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Template = "Background(17) = 255" // oGrid.Background(17) = 255
' oGrid.Columns.Add("Editor").Editor.EditType = 3
var_Editor = oGrid.Columns.Add("Editor").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 3"

oGrid.Items.AddItem(20)

374
How can change the visual appearance for the spin control, using your EBN files

Dim oGrid as P
Dim var_Editor as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn")
oGrid.VisualAppearance.Add(2,"c:\exontrol\images\pushed.ebn")
oGrid.Template = "Background(22) = 16777216" // oGrid.Background(22) = 16777216
oGrid.Template = "Background(23) = 33554432" // oGrid.Background(23) = 33554432
oGrid.Template = "Background(24) = 16777216" // oGrid.Background(24) = 16777216
oGrid.Template = "Background(25) = 33554432" // oGrid.Background(25) = 33554432
' oGrid.Columns.Add("Editor").Editor.EditType = 4
var_Editor = oGrid.Columns.Add("Editor").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 4"

oGrid.Items.AddItem(20)

373
How can change the visual appearance for the slider or track bar, using your EBN files

Dim oGrid as P
Dim var_Editor as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn")
oGrid.Template = "Background(16) = 16777216" // oGrid.Background(16) = 16777216
oGrid.Template = "Background(15) = 13816530" // oGrid.Background(15) = 13816530
' oGrid.Columns.Add("Editor").Editor.EditType = 20
var_Editor = oGrid.Columns.Add("Editor").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 20"

oGrid.Items.AddItem(20)

372
How can change the visual appearance for the button that are visible inside the editors, using your EBN files

Dim oGrid as P
Dim var_Editor as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn")
oGrid.VisualAppearance.Add(2,"c:\exontrol\images\pushed.ebn")
oGrid.Template = "Background(7) = 16777216" // oGrid.Background(7) = 16777216
oGrid.Template = "Background(6) = 33554432" // oGrid.Background(6) = 33554432
var_Editor = oGrid.Columns.Add("Editor").Editor
	var_Editor.EditType = 7
	var_Editor.AddButton(1)
oGrid.Items.AddItem("1/1/2002")

371
How can change the visual appearance for the button that shows the drop down editors, using your EBN files

Dim oGrid as P
Dim var_Editor as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn")
oGrid.VisualAppearance.Add(2,"c:\exontrol\images\pushed.ebn")
oGrid.Template = "Background(4) = 16777216" // oGrid.Background(4) = 16777216
oGrid.Template = "Background(5) = 33554432" // oGrid.Background(5) = 33554432
' oGrid.Columns.Add("Editor").Editor.EditType = 7
var_Editor = oGrid.Columns.Add("Editor").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 7"

oGrid.Items.AddItem("1/1/2002")

370
How can I find the column that gets the focus
Dim oGrid as P
Dim var_Editor as local
Dim var_Editor1 as local
Dim var_Items as P
Dim var_Items1 as P
Dim var_Items2 as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.MarkSearchColumn = .f.
' oGrid.Columns.Add("Edit1").Editor.EditType = 1
var_Editor = oGrid.Columns.Add("Edit1").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 1"

' oGrid.Columns.Add("Edit2").Editor.EditType = 1
var_Editor1 = oGrid.Columns.Add("Edit2").Editor
oGrid.TemplateDef = "dim var_Editor1"
oGrid.TemplateDef = var_Editor1
oGrid.Template = "var_Editor1.EditType = 1"

var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem(1),1) = 2
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(1),1) = 2"

var_Items1 = oGrid.Items
	' var_Items1.CellValue(var_Items1.AddItem(3),1) = 4
	oGrid.TemplateDef = "dim var_Items1"
	oGrid.TemplateDef = var_Items1
	oGrid.Template = "var_Items1.CellValue(AddItem(3),1) = 4"

var_Items2 = oGrid.Items
	' var_Items2.ItemDivider(var_Items2.AddItem(oGrid.FocusColumnIndex)) = 0
	oGrid.TemplateDef = "dim var_Items2"
	oGrid.TemplateDef = var_Items2
	oGrid.Template = "var_Items2.ItemDivider(AddItem(Me.FocusColumnIndex)) = 0"


369
How do I make the control read-only, but still can see the values in a drop down list

Dim oGrid as P
Dim var_Editor as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.DrawGridLines = -1
oGrid.ReadOnly = 1
' oGrid.Columns.Add("Editor").Editor.EditType = 7
var_Editor = oGrid.Columns.Add("Editor").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 7"

oGrid.Items.AddItem("1/1/2003")

368
How do I make the control read-only (method 1)
Dim oGrid as P
Dim var_Column as P
Dim var_Editor as P
Dim var_Editor1 as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ReadOnly = -1
var_Editor = oGrid.Columns.Add("Editor").Editor
	var_Editor.EditType = 6
	var_Editor.AddItem(1,"One")
	var_Editor.AddItem(2,"Two")
var_Column = oGrid.Columns.Add("Check")
	var_Editor1 = var_Column.Editor
		var_Editor1.EditType = 19
		' var_Editor1.Option(16) = 2
		oGrid.TemplateDef = "dim var_Editor1"
		oGrid.TemplateDef = var_Editor1
		oGrid.Template = "var_Editor1.Option(16) = 2"

var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem(1),1) = 0
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(1),1) = 0"

	' var_Items.CellValue(var_Items.AddItem(2),1) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(2),1) = 1"

oGrid.EndUpdate()

367
How do I change the control's border, using your EBN files

Dim oGrid as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn")
oGrid.Appearance = 16777216 '1000000 + 

366
Can I change the default border of the tooltip, using your EBN files

Dim oGrid as P
Dim var_Column as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.ToolTipDelay = 1
oGrid.ToolTipWidth = 364
oGrid.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn")
oGrid.Template = "Background(64) = 16777216" // oGrid.Background(64) = 16777216
' oGrid.Columns.Add("tootip").ToolTip = "this is a tooltip assigned to a column"
var_Column = oGrid.Columns.Add("tootip")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.ToolTip = `this is a tooltip assigned to a column`"


365
Can I change the background color for the tooltip

Dim oGrid as P
Dim var_Column as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.ToolTipDelay = 1
oGrid.ToolTipWidth = 364
oGrid.Template = "Background(65) = 255" // oGrid.Background(65) = 255
' oGrid.Columns.Add("tootip").ToolTip = "this is a tooltip assigned to a column"
var_Column = oGrid.Columns.Add("tootip")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.ToolTip = `this is a tooltip assigned to a column`"


364
Does the tooltip support HTML format

Dim oGrid as P
Dim var_Column as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.ToolTipDelay = 1
oGrid.ToolTipWidth = 364
' oGrid.Columns.Add("tootip").ToolTip = "<font Tahoma;11>T</font>his is an HTML <b>tooltip</b> assigned to a <fgcolor=FF0000>column</fgcolor>"
var_Column = oGrid.Columns.Add("tootip")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.ToolTip = `<font Tahoma;11>T</font>his is an HTML <b>tooltip</b> assigned to a <fgcolor=FF0000>column</fgcolor>`"


363
Can I change the forecolor for the tooltip

Dim oGrid as P
Dim var_Column as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.ToolTipDelay = 1
oGrid.ToolTipWidth = 364
oGrid.Template = "Background(66) = 255" // oGrid.Background(66) = 255
' oGrid.Columns.Add("tootip").ToolTip = "this is a tooltip assigned to a column"
var_Column = oGrid.Columns.Add("tootip")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.ToolTip = `this is a tooltip assigned to a column`"


362
Can I change the foreground color for the tooltip

Dim oGrid as P
Dim var_Column as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.ToolTipDelay = 1
oGrid.ToolTipWidth = 364
' oGrid.Columns.Add("tootip").ToolTip = "<fgcolor=FF0000>this is a tooltip assigned to a column</fgcolor>"
var_Column = oGrid.Columns.Add("tootip")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.ToolTip = `<fgcolor=FF0000>this is a tooltip assigned to a column</fgcolor>`"


361
How can I merge cells

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.DrawGridLines = -1
oGrid.MarkSearchColumn = .f.
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
oGrid.Columns.Add("C3")
var_Items = oGrid.Items
	h = var_Items.AddItem("this cell merges the first two columns")
	' var_Items.CellMerge(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellMerge(h,0) = 1"

	h = var_Items.AddItem()
	' var_Items.CellValue(h,1) = "this cell merges the last two columns"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `this cell merges the last two columns`"

	' var_Items.CellMerge(h,1) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellMerge(h,1) = 2"

	h = var_Items.AddItem("this cell merges the all three columns")
	' var_Items.CellMerge(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellMerge(h,0) = 1"

	' var_Items.CellMerge(h,0) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellMerge(h,0) = 2"

	h = var_Items.AddItem("this draws a divider item")
	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"


360
How can I merge cells

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.MarkSearchColumn = .f.
oGrid.TreeColumnIndex = -1
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.`"

	' var_Items.CellSingleLine(h,1) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,1) = False"

	h = var_Items.AddItem("This is bit of text merges all cells in the item")
	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.CellHAlignment(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,0) = 1"


359
How can I specify the width for a splited cell

Dim h as N
Dim oGrid as P
Dim s as 
Dim s1 as 
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.DrawGridLines = -2
oGrid.Columns.Add("Single Column")
var_Items = oGrid.Items
	h = var_Items.AddItem("Split 1")
	s = var_Items.SplitCell(h,0)
	' var_Items.CellWidth(,s) = 64
	oGrid.TemplateDef = "dim var_Items,s"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = s
	oGrid.Template = "var_Items.CellWidth(,s) = 64"

	' var_Items.CellValue(,s) = "Split 2"
	oGrid.TemplateDef = "dim var_Items,s"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = s
	oGrid.Template = "var_Items.CellValue(,s) = `Split 2`"

	s1 = var_Items.SplitCell(,s)
	' var_Items.CellValue(,s1) = "Split 3"
	oGrid.TemplateDef = "dim var_Items,s1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = s1
	oGrid.Template = "var_Items.CellValue(,s1) = `Split 3`"

	' var_Items.CellWidth(,s1) = 64
	oGrid.TemplateDef = "dim var_Items,s1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = s1
	oGrid.Template = "var_Items.CellWidth(,s1) = 64"


358
How can I split a cell in three parts

Dim h as N
Dim oGrid as P
Dim s as 
Dim s1 as 
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.DrawGridLines = -2
oGrid.Columns.Add("Single Column")
var_Items = oGrid.Items
	h = var_Items.AddItem("Split 1")
	s = var_Items.SplitCell(h,0)
	' var_Items.CellValue(,s) = "Split 2"
	oGrid.TemplateDef = "dim var_Items,s"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = s
	oGrid.Template = "var_Items.CellValue(,s) = `Split 2`"

	s1 = var_Items.SplitCell(,s)
	' var_Items.CellValue(,s1) = "Split 3"
	oGrid.TemplateDef = "dim var_Items,s1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = s1
	oGrid.Template = "var_Items.CellValue(,s1) = `Split 3`"


357
How can I add a button aligned to right

Dim oGrid as P
Dim s as 
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGrid.Columns.Add("Single Column")
oGrid.ShowFocusRect = .f.
var_Items = oGrid.Items
	' var_Items.ItemDivider(var_Items.AddItem("This is a bit of text being displayed on the entire item")) = 0
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemDivider(AddItem(`This is a bit of text being displayed on the entire item`)) = 0"

	s = var_Items.SplitCell(var_Items.AddItem("Split Cell 1.1"),0)
	' var_Items.CellValue(,s) = "Split Cell <img>1</img>"
	oGrid.TemplateDef = "dim var_Items,s"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = s
	oGrid.Template = "var_Items.CellValue(,s) = `Split Cell <img>1</img>`"

	' var_Items.CellValueFormat(,s) = 1
	oGrid.TemplateDef = "dim var_Items,s"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = s
	oGrid.Template = "var_Items.CellValueFormat(,s) = 1"

	' var_Items.CellHAlignment(,s) = 1
	oGrid.TemplateDef = "dim var_Items,s"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = s
	oGrid.Template = "var_Items.CellHAlignment(,s) = 1"

	' var_Items.CellHasButton(,s) = .t.
	oGrid.TemplateDef = "dim var_Items,s"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = s
	oGrid.Template = "var_Items.CellHasButton(,s) = 16777216"

	' var_Items.CellWidth(,s) = 84
	oGrid.TemplateDef = "dim var_Items,s"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = s
	oGrid.Template = "var_Items.CellWidth(,s) = 84"


356
How can I split a cell

Dim oGrid as P
Dim s as 
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.DrawGridLines = -2
oGrid.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGrid.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn")
oGrid.Columns.Add("Single Column")
oGrid.ShowFocusRect = .f.
var_Items = oGrid.Items
	s = var_Items.SplitCell(var_Items.AddItem("Split Cell 1.1"),0)
	' var_Items.CellValue(,s) = "Split Cell <img>1</img>"
	oGrid.TemplateDef = "dim var_Items,s"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = s
	oGrid.Template = "var_Items.CellValue(,s) = `Split Cell <img>1</img>`"

	' var_Items.CellValueFormat(,s) = 1
	oGrid.TemplateDef = "dim var_Items,s"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = s
	oGrid.Template = "var_Items.CellValueFormat(,s) = 1"

	' var_Items.CellHAlignment(,s) = 1
	oGrid.TemplateDef = "dim var_Items,s"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = s
	oGrid.Template = "var_Items.CellHAlignment(,s) = 1"

	' var_Items.CellBackColor(,s) = 16777216
	oGrid.TemplateDef = "dim var_Items,s"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = s
	oGrid.Template = "var_Items.CellBackColor(,s) = 16777216"

	' var_Items.CellWidth(,s) = 84
	oGrid.TemplateDef = "dim var_Items,s"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = s
	oGrid.Template = "var_Items.CellWidth(,s) = 84"


355
Can I select an item giving its general position

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	var_Items.SelectPos = 1

354
How can I change the color for separator / dividers items

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.GridLineColor = 255
oGrid.MarkSearchColumn = .f.
oGrid.TreeColumnIndex = -1
oGrid.ScrollBySingleLine = .f.
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.`"

	' var_Items.CellSingleLine(h,1) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,1) = False"

	h = var_Items.AddItem()
	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.ItemDividerLine(h) = 4
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDividerLine(h) = 4"

	' var_Items.ItemDividerLineAlignment(h) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDividerLineAlignment(h) = 1"

	' var_Items.ItemHeight(h) = 6
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemHeight(h) = 6"

	' var_Items.SelectableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectableItem(h) = False"

	h = var_Items.AddItem("Cell 2")
	' var_Items.CellValue(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.`"

	' var_Items.CellSingleLine(h,1) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,1) = False"


353
How can I add separator - dividers items

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.MarkSearchColumn = .f.
oGrid.TreeColumnIndex = -1
oGrid.ScrollBySingleLine = .f.
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.`"

	' var_Items.CellSingleLine(h,1) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,1) = False"

	h = var_Items.AddItem()
	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.ItemDividerLine(h) = 4
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDividerLine(h) = 4"

	' var_Items.ItemDividerLineAlignment(h) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDividerLineAlignment(h) = 1"

	' var_Items.ItemHeight(h) = 6
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemHeight(h) = 6"

	' var_Items.SelectableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectableItem(h) = False"

	h = var_Items.AddItem("Cell 2")
	' var_Items.CellValue(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.`"

	' var_Items.CellSingleLine(h,1) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,1) = False"


352
Can I change the style of the line being displayed by a divider item

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.MarkSearchColumn = .f.
oGrid.TreeColumnIndex = -1
oGrid.ScrollBySingleLine = .f.
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.`"

	' var_Items.CellSingleLine(h,1) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,1) = False"

	h = var_Items.AddItem("This is bit of text that's displayed on the entire item, divider.")
	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.ItemDividerLine(h) = 4
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDividerLine(h) = 4"

	' var_Items.CellHAlignment(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,0) = 1"

	' var_Items.ItemHeight(h) = 24
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemHeight(h) = 24"


351
Can I remove the line being displayed by a divider item

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.MarkSearchColumn = .f.
oGrid.TreeColumnIndex = -1
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.`"

	' var_Items.CellSingleLine(h,1) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,1) = False"

	h = var_Items.AddItem("This is bit of text that's displayed on the entire item, divider.")
	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.ItemDividerLine(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDividerLine(h) = 0"

	' var_Items.CellHAlignment(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,0) = 1"


350
How can I display a divider item, merging all cells

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.MarkSearchColumn = .f.
oGrid.TreeColumnIndex = -1
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.`"

	' var_Items.CellSingleLine(h,1) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,1) = False"

	h = var_Items.AddItem("This is bit of text that's displayed on the entire item, divider.")
	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.CellHAlignment(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,0) = 1"


349
How can I fix or lock items

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	' var_Items.LockedItemCount(0) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(0) = 1"

	' var_Items.CellValue(var_Items.LockedItem(0,0),0) = "This is a locked item, fixed to the top side of the control."
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(LockedItem(0,0),0) = `This is a locked item, fixed to the top side of the control.`"

	' var_Items.ItemBackColor(var_Items.LockedItem(0,0)) = 12240068
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemBackColor(LockedItem(0,0)) = 12240068"

	' var_Items.LockedItemCount(2) = 2
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(2) = 2"

	' var_Items.CellValue(var_Items.LockedItem(2,0),0) = "This is a locked item, fixed to the top side of the control."
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(LockedItem(2,0),0) = `This is a locked item, fixed to the top side of the control.`"

	' var_Items.ItemBackColor(var_Items.LockedItem(2,0)) = 12240068
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemBackColor(LockedItem(2,0)) = 12240068"

	' var_Items.CellValue(var_Items.LockedItem(2,1),0) = "This is a locked item, fixed to the top side of the control."
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(LockedItem(2,1),0) = `This is a locked item, fixed to the top side of the control.`"

	' var_Items.ItemBackColor(var_Items.LockedItem(2,1)) = 12237498
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemBackColor(LockedItem(2,1)) = 12237498"


348
How can I fix or lock an item on the bottom side of the control

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	' var_Items.LockedItemCount(2) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(2) = 1"

	' var_Items.CellValue(var_Items.LockedItem(2,0),0) = "This is a locked item, fixed to the bottom side of the control."
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(LockedItem(2,0),0) = `This is a locked item, fixed to the bottom side of the control.`"

	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"


347
How can I fix or lock an item on the top of the control

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	' var_Items.LockedItemCount(0) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(0) = 1"

	' var_Items.CellValue(var_Items.LockedItem(0,0),0) = "This is a locked item, fixed to the top side of the control."
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(LockedItem(0,0),0) = `This is a locked item, fixed to the top side of the control.`"

	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"


346
Is there any function to limit the height of the items when I display it using multiple lines

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.ScrollBySingleLine = .t.
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.`"

	' var_Items.CellSingleLine(h,1) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,1) = False"

	' var_Items.ItemMaxHeight(h) = 48
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemMaxHeight(h) = 48"


345
Why I cannot center my cells in the column

Dim oGrid as P
Dim var_Column as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.TreeColumnIndex = -1
oGrid.DrawGridLines = -2
' oGrid.Columns.Add("Default").Alignment = 1
var_Column = oGrid.Columns.Add("Default")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.Alignment = 1"

oGrid.Items.AddItem("item 1")
oGrid.Items.AddItem("item 2")
oGrid.Items.AddItem("item 3")

344
How can I align the cell to the left, center or to the right

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.TreeColumnIndex = -1
oGrid.DrawGridLines = -2
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	' var_Items.CellHAlignment(var_Items.AddItem("left"),0) = 0
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellHAlignment(AddItem(`left`),0) = 0"

	' var_Items.CellHAlignment(var_Items.AddItem("center"),0) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellHAlignment(AddItem(`center`),0) = 1"

	' var_Items.CellHAlignment(var_Items.AddItem("right"),0) = 2
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellHAlignment(AddItem(`right`),0) = 2"


343
How do I apply HTML format to a cell

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.TreeColumnIndex = -1
oGrid.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGrid.Template = "HTMLPicture(`p1`) = `c:\exontrol\images\zipdisk.gif`" // oGrid.HTMLPicture("p1") = "c:\exontrol\images\zipdisk.gif"
oGrid.Template = "HTMLPicture(`p2`) = `c:\exontrol\images\auction.gif`" // oGrid.HTMLPicture("p2") = "c:\exontrol\images\auction.gif"
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("The following item shows some of the HTML format supported:")
	' var_Items.CellHAlignment(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,0) = 1"

	h = var_Items.AddItem("<br>text icons <img>1</img>, <img>2</img>, ... pictures <img>p1</img>, <img>p2</img> <br><br>text <b>bold</b>, <i>italic</i>, <u>underline</u>, <s>strikeout</s>, ...<br><dotline>and so on...<br> <a>anchor</a> or <a2>hyperlink</a><br><fgcolor=FF0000>fgcolor</fgcolor> or <bgcolor=00FF00>bgcolor</bgcolor> ")
	' var_Items.CellValueFormat(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 1"

	' var_Items.CellSingleLine(h,0) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,0) = False"


342
How can I change the font for a cell

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
oGrid.Items.AddItem("std font")
var_Items = oGrid.Items
	' var_Items.CellValueFormat(var_Items.AddItem("this <font tahoma;12>is a bit of text with</font> a different font"),0) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValueFormat(AddItem(`this <font tahoma;12>is a bit of text with</font> a different font`),0) = 1"


341
How can I change the font for a cell

Dim f as P
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
oGrid.Items.AddItem("default font")
f = OLE.Create("StdFont")
	f.Name = "Tahoma"
	f.Size = 12
var_Items = oGrid.Items
	' var_Items.CellFont(var_Items.AddItem("new font"),0) = f
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellFont(AddItem(`new font`),0) = f"


340
How can I change the font for entire item

Dim f as P
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
oGrid.Items.AddItem("default font")
f = OLE.Create("StdFont")
	f.Name = "Tahoma"
	f.Size = 12
var_Items = oGrid.Items
	' var_Items.ItemFont(var_Items.AddItem("new font")) = f
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemFont(AddItem(`new font`)) = f"


339
How do I vertically align a cell

Dim h as N
Dim oGrid as P
Dim var_Column as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.DrawGridLines = -2
' oGrid.Columns.Add("MultipleLine").Def(16) = .f.
var_Column = oGrid.Columns.Add("MultipleLine")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.Def(16) = False"

oGrid.Columns.Add("VAlign")
var_Items = oGrid.Items
	h = var_Items.AddItem("This is a bit of long text that should break the line")
	' var_Items.CellValue(h,1) = "top"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `top`"

	' var_Items.CellVAlignment(h,1) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellVAlignment(h,1) = 0"

	h = var_Items.AddItem("This is a bit of long text that should break the line")
	' var_Items.CellValue(h,1) = "middle"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `middle`"

	' var_Items.CellVAlignment(h,1) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellVAlignment(h,1) = 1"

	h = var_Items.AddItem("This is a bit of long text that should break the line")
	' var_Items.CellValue(h,1) = "bottom"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `bottom`"

	' var_Items.CellVAlignment(h,1) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellVAlignment(h,1) = 2"


338
How can I change the position of an item

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	var_Items.AddItem("Item 1")
	var_Items.AddItem("Item 2")
	' var_Items.ItemPosition(var_Items.AddItem("Item 3")) = 0
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemPosition(AddItem(`Item 3`)) = 0"


337
How do I find an item based on a path

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	' var_Items.ItemData(var_Items.InsertItem(h,,"Child 2")) = 1234
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemData(InsertItem(h,,`Child 2`)) = 1234"

	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBold(var_Items.FindPath("Root 1\Child 1")) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemBold(FindPath(`Root 1\Child 1`)) = True"


336
How do I find an item based on my extra data

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	' var_Items.ItemData(var_Items.InsertItem(h,,"Child 2")) = 1234
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemData(InsertItem(h,,`Child 2`)) = 1234"

	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBold(var_Items.FindItemData(1234)) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemBold(FindItemData(1234)) = True"


335
How do I find an item

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBold(var_Items.FindItem("Child 2",0)) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemBold(FindItem(`Child 2`,0)) = True"


334
How can I insert a hyperlink or an anchor element

Dim oGrid as P
Dim var_Items as P
Dim var_Items1 as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Column")
var_Items = oGrid.Items
	' var_Items.CellValueFormat(var_Items.AddItem("Just an <a1>anchor</a> element ..."),0) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValueFormat(AddItem(`Just an <a1>anchor</a> element ...`),0) = 1"

var_Items1 = oGrid.Items
	' var_Items1.CellValueFormat(var_Items1.AddItem("Just another <a2>anchor</a> element ..."),0) = 1
	oGrid.TemplateDef = "dim var_Items1"
	oGrid.TemplateDef = var_Items1
	oGrid.Template = "var_Items1.CellValueFormat(AddItem(`Just another <a2>anchor</a> element ...`),0) = 1"


333
How do I find the index of the item based on its handle

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBold(var_Items.ItemByIndex(var_Items.ItemToIndex(h))) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemBold(ItemByIndex(ItemToIndex(h))) = True"


332
How do I find the handle of the item based on its index

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBold(var_Items.ItemByIndex(1)) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemBold(ItemByIndex(1)) = True"


331
How can I find the cell being clicked in a radio group

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.MarkSearchColumn = .f.
oGrid.SelBackColor = 8454143
oGrid.SelForeColor = 0
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
oGrid.Columns.Add("C3")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "Radio 1"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Radio 1`"

	' var_Items.CellHasRadioButton(h,1) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasRadioButton(h,1) = True"

	' var_Items.CellRadioGroup(h,1) = 1234
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellRadioGroup(h,1) = 1234"

	' var_Items.CellValue(h,2) = "Radio 2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = `Radio 2`"

	' var_Items.CellHasRadioButton(h,2) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasRadioButton(h,2) = True"

	' var_Items.CellRadioGroup(h,2) = 1234
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellRadioGroup(h,2) = 1234"

	' var_Items.CellState(h,1) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellState(h,1) = 1"

	' var_Items.CellBold(,var_Items.CellChecked(1234)) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellBold(,CellChecked(1234)) = True"


330
Can I add a +/- ( expand / collapse ) buttons to each item, so I can load the child items later

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.LinesAtRoot = -1
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	' var_Items.ItemHasChildren(var_Items.AddItem("parent item with no child items")) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemHasChildren(AddItem(`parent item with no child items`)) = True"

	var_Items.AddItem("next item")

329
Can I let the user to resize at runtime the specified item

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.ScrollBySingleLine = .t.
oGrid.DrawGridLines = -2
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	' var_Items.ItemAllowSizing(var_Items.AddItem("resizable item")) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemAllowSizing(AddItem(`resizable item`)) = True"

	var_Items.AddItem("not resizable item")

328
How can I change the size ( width, height ) of the picture

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	' var_Items.CellPicture(h,0) = oGrid.ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellPicture(h,0) = Me.ExecuteTemplate(`loadpicture(``c:\exontrol\images\zipdisk.gif``)`)"

	' var_Items.CellPictureWidth(h,0) = 24
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellPictureWidth(h,0) = 24"

	' var_Items.CellPictureHeight(h,0) = 24
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellPictureHeight(h,0) = 24"

	' var_Items.ItemHeight(h) = 32
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemHeight(h) = 32"

	h = var_Items.AddItem("Root 2")
	' var_Items.CellPicture(h,0) = oGrid.ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellPicture(h,0) = Me.ExecuteTemplate(`loadpicture(``c:\exontrol\images\zipdisk.gif``)`)"

	' var_Items.ItemHeight(h) = 48
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemHeight(h) = 48"


327
How can I find the number or the count of selected items

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.SingleSel = .f.
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.SelectItem(var_Items.ItemChild(h)) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.SelectItem(ItemChild(h)) = True"

	' var_Items.SelectItem(var_Items.NextSiblingItem(var_Items.ItemChild(h))) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.SelectItem(NextSiblingItem(ItemChild(h))) = True"

	var_Items.AddItem(oGrid.ExecuteTemplate("Items.SelectCount()"))

326
How do I unselect an item

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.SelectItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectItem(h) = False"


325
How do I find the selected item

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.SelectItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectItem(h) = True"

	' var_Items.ItemBold(var_Items.SelectedItem(0)) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemBold(SelectedItem(0)) = True"


324
How do I un select all items
Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.SingleSel = .f.
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	var_Items.UnselectAll()

323
How do I select multiple items

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.SingleSel = .f.
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.SelectItem(var_Items.ItemChild(h)) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.SelectItem(ItemChild(h)) = True"

	' var_Items.SelectItem(var_Items.NextSiblingItem(var_Items.ItemChild(h))) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.SelectItem(NextSiblingItem(ItemChild(h))) = True"


322
How do I select all items

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.SingleSel = .f.
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	var_Items.SelectAll()

321
How do I select an item

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.SelectItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectItem(h) = True"


320
Can I display a button with some picture or icon inside

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Template = "HTMLPicture(`p1`) = `c:\exontrol\images\zipdisk.gif`" // oGrid.HTMLPicture("p1") = "c:\exontrol\images\zipdisk.gif"
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = " Button <img>p1</img> "
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = ` Button <img>p1</img> `"

	' var_Items.CellValueFormat(h,1) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,1) = 1"

	' var_Items.CellHAlignment(h,1) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,1) = 2"

	' var_Items.CellHasButton(h,1) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasButton(h,1) = True"

	' var_Items.CellButtonAutoWidth(h,1) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellButtonAutoWidth(h,1) = True"

	' var_Items.ItemHeight(h) = 48
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemHeight(h) = 48"


319
Can I display a button with some picture or icon inside

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = " Button <img>1</img> "
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = ` Button <img>1</img> `"

	' var_Items.CellValueFormat(h,1) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,1) = 1"

	' var_Items.CellHAlignment(h,1) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,1) = 2"

	' var_Items.CellHasButton(h,1) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasButton(h,1) = True"

	' var_Items.CellButtonAutoWidth(h,1) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellButtonAutoWidth(h,1) = True"


318
Can I display a button with some icon inside

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = " <img>1</img> "
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = ` <img>1</img> `"

	' var_Items.CellValueFormat(h,1) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,1) = 1"

	' var_Items.CellHAlignment(h,1) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,1) = 2"

	' var_Items.CellHasButton(h,1) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasButton(h,1) = True"

	' var_Items.CellButtonAutoWidth(h,1) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellButtonAutoWidth(h,1) = True"


317
How can I assign multiple icon/picture to a cell

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Template = "HTMLPicture(`p1`) = `c:\exontrol\images\zipdisk.gif`" // oGrid.HTMLPicture("p1") = "c:\exontrol\images\zipdisk.gif"
oGrid.Template = "HTMLPicture(`p2`) = `c:\exontrol\images\auction.gif`" // oGrid.HTMLPicture("p2") = "c:\exontrol\images\auction.gif"
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("text <img>p1</img> another picture <img>p2</img> and so on")
	' var_Items.CellValueFormat(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 1"

	' var_Items.CellPicture(h,0) = oGrid.ExecuteTemplate("loadpicture(`c:\exontrol\images\colorize.gif`)")
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellPicture(h,0) = Me.ExecuteTemplate(`loadpicture(``c:\exontrol\images\colorize.gif``)`)"

	' var_Items.ItemHeight(h) = 48
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemHeight(h) = 48"

	var_Items.AddItem("Root 2")

316
How can I assign an icon/picture to a cell

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	' var_Items.CellPicture(h,0) = oGrid.ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellPicture(h,0) = Me.ExecuteTemplate(`loadpicture(``c:\exontrol\images\zipdisk.gif``)`)"

	' var_Items.ItemHeight(h) = 48
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemHeight(h) = 48"

	var_Items.AddItem("Root 2")

315
How can I assign multiple icons/pictures to a cell

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root <img>1</img> 1, <img>2</img>, ... and so on ")
	' var_Items.CellValueFormat(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 1"


314
How can I assign multiple icons/pictures to a cell

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	' var_Items.CellImages(h,0) = "1,2,3"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImages(h,0) = `1,2,3`"


313
How can I assign an icon/picture to a cell

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	' var_Items.CellImage(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImage(h,0) = 1"

	' var_Items.CellImage(var_Items.InsertItem(h,,"Child 1"),0) = 2
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellImage(InsertItem(h,,`Child 1`),0) = 2"

	' var_Items.CellImage(var_Items.InsertItem(h,,"Child 2"),0) = 3
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellImage(InsertItem(h,,`Child 2`),0) = 3"

	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"


312
How can I get the handle of an item based on the handle of the cell

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBold(var_Items.CellItem(var_Items.ItemCell(h,0))) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemBold(CellItem(ItemCell(h,0))) = True"


311
How can I display a button inside the item or cell

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = " Button 1 "
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = ` Button 1 `"

	' var_Items.CellHAlignment(h,1) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,1) = 2"

	' var_Items.CellHasButton(h,1) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasButton(h,1) = True"

	' var_Items.CellButtonAutoWidth(h,1) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellButtonAutoWidth(h,1) = True"

	h = var_Items.AddItem("Cell 2")
	' var_Items.CellValue(h,1) = " Button 2 "
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = ` Button 2 `"

	' var_Items.CellHAlignment(h,1) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,1) = 1"

	' var_Items.CellHasButton(h,1) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasButton(h,1) = True"


310
How can I change the state of a radio button

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.MarkSearchColumn = .f.
oGrid.SelBackColor = 8454143
oGrid.SelForeColor = 0
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
oGrid.Columns.Add("C3")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "Radio 1"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Radio 1`"

	' var_Items.CellHasRadioButton(h,1) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasRadioButton(h,1) = True"

	' var_Items.CellRadioGroup(h,1) = 1234
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellRadioGroup(h,1) = 1234"

	' var_Items.CellValue(h,2) = "Radio 2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = `Radio 2`"

	' var_Items.CellHasRadioButton(h,2) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasRadioButton(h,2) = True"

	' var_Items.CellRadioGroup(h,2) = 1234
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellRadioGroup(h,2) = 1234"

	' var_Items.CellState(h,1) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellState(h,1) = 1"


309
How can I assign a radio button to a cell

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.MarkSearchColumn = .f.
oGrid.SelBackColor = 8454143
oGrid.SelForeColor = 0
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
oGrid.Columns.Add("C3")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "Radio 1"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Radio 1`"

	' var_Items.CellHasRadioButton(h,1) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasRadioButton(h,1) = True"

	' var_Items.CellRadioGroup(h,1) = 1234
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellRadioGroup(h,1) = 1234"

	' var_Items.CellValue(h,2) = "Radio 2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = `Radio 2`"

	' var_Items.CellHasRadioButton(h,2) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasRadioButton(h,2) = True"

	' var_Items.CellRadioGroup(h,2) = 1234
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellRadioGroup(h,2) = 1234"

	' var_Items.CellState(h,1) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellState(h,1) = 1"


308
How can I change the state of a checkbox

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "Check Box"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Check Box`"

	' var_Items.CellHasCheckBox(h,1) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasCheckBox(h,1) = True"

	' var_Items.CellState(h,1) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellState(h,1) = 1"


307
How can I assign a checkbox to a cell

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "Check Box"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Check Box`"

	' var_Items.CellHasCheckBox(h,1) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasCheckBox(h,1) = True"


306
How can I display an item or a cell on multiple lines

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.ScrollBySingleLine = .t.
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "This is bit of text that's shown on multiple lines"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `This is bit of text that's shown on multiple lines`"

	' var_Items.CellSingleLine(h,1) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,1) = False"


305
How can I assign a tooltip to a cell

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "tooltip"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `tooltip`"

	' var_Items.CellToolTip(h,1) = "This is bit of text that's shown when the user hovers the cell"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellToolTip(h,1) = `This is bit of text that's shown when the user hovers the cell`"


304
How can I associate an extra data to a cell
Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "Cell 2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Cell 2`"

	' var_Items.CellData(h,1) = "your extra data"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellData(h,1) = `your extra data`"


303
How do I enable or disable a cell

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "Cell 2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Cell 2`"

	' var_Items.CellValue(h,2) = "Cell 3"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = `Cell 3`"

	' var_Items.CellEnabled(h,1) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellEnabled(h,1) = False"


302
How do I change the cell's foreground color

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "Cell 2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Cell 2`"

	' var_Items.CellForeColor(h,1) = 255
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellForeColor(h,1) = 255"


301
How do I change the visual effect for the cell, using your EBN files

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn")
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellValue(h,1) = "Cell 2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Cell 2`"

	' var_Items.CellBackColor(h,1) = 16777216
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellBackColor(h,1) = 16777216"